package qiyu.live.living.provider.rpc;

import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;
import org.qiyu.live.common.interfaces.vo.PageWrapper;
import qiyu.live.living.dto.req.LivingRoomReqDTO;
import qiyu.live.living.dto.req.OnlinePkReqDTO;
import qiyu.live.living.dto.resp.LivingRoomRespDTO;
import qiyu.live.living.interfaces.ILivingRoomRpc;
import qiyu.live.living.provider.service.ILivingRoomService;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sfx
 * Date: 2023-10-24
 * Time: 19:56
 */
@DubboService
public class ILivingRoomRpcImpl implements ILivingRoomRpc {

    @Resource
    private ILivingRoomService livingRoomService;

    @Override
    public Integer startLivingRoom(LivingRoomReqDTO livingRoomReqDTO) {
        return livingRoomService.startLivingRoom(livingRoomReqDTO);
    }

    @Override
    public boolean closeLivingRoom(LivingRoomReqDTO livingRoomReqDTO) {
        return livingRoomService.closeLivingRoom(livingRoomReqDTO);
    }

    @Override
    public PageWrapper<LivingRoomRespDTO> list(LivingRoomReqDTO livingRoomReqDTO) {
        return livingRoomService.list(livingRoomReqDTO);
    }

    @Override
    public LivingRoomRespDTO queryByRoomId(Integer roomId) {
        return null;
    }

    @Override
    public List<Long> queryUserIdsByRoomId(LivingRoomReqDTO livingRoomReqDTO) {
        return livingRoomService.queryUserIdsByRoomId(livingRoomReqDTO);
    }

    @Override
    public boolean onlinePk(OnlinePkReqDTO onlinePkReqDTO) {
        return livingRoomService.onlinePk(onlinePkReqDTO);
    }

    @Override
    public Long queryOnlinePkObjId(Integer roomId) {
        return livingRoomService.queryOnlinePkObjId(roomId);
    }
}